package com.xiaotou.domain;

public enum WealthLevel {
	Poor(0), Middle(10), Rich(20);

	private int value;

	WealthLevel(int value) {
		this.value = value;
	}

	public int getValue() {
		return this.value;
	}

	public WealthLevel valueOf(int value) {
		for (WealthLevel level : values()) {
			if (level.getValue() == value) {
				return level;
			}
		}
		throw new RuntimeException("error Wealth level value: " + value);
	}
}
